package com.cg.bank.web.util;

/**
 * 应用异常
 * 
 * @author chunges
 * @date 2018年9月1日 上午8:32:30
 * @version V1.0
 */

public class AppException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	/**
	 * 用于保存错误信息Key
	 */
	private String errorKey;
	/**
	 * 用于填充错误信息参数数组
	 */
	private Object[] parameters;
	
	public AppException(String errorKey) {
		this.errorKey = errorKey;
	}

	public AppException(String errorKey, String parameter) {
		this(errorKey, new Object[] {parameter});
	}

	public AppException(String errorKey, Object[] parameters) {
		this.errorKey = errorKey;
		this.parameters = parameters;
	}

	public String getErrorKey() {
		return errorKey;
	}

	public void setErrorKey(String errorKey) {
		this.errorKey = errorKey;
	}

	public Object[] getParameters() {
		return parameters;
	}

	public void setParameters(Object[] parameters) {
		this.parameters = parameters;
	}

}